package com.alenty.gwt.slider.client;

import com.alenty.gwt.touch.client.TouchEventListener;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Label;


public class TouchSlider extends Label implements TouchEventListener{
	
	public TouchSlider(){
		super();
		
		// register touch events
		registerTouchEvents(this.getElement());
		
	}

	private native void registerTouchEvents(Element e) /*-{
		
		e.ontouchstart = this.@com.alenty.gwt.touch.client.TouchSlider::onTouchStart()();
		e.ontouchstop = this.@com.alenty.gwt.touch.client.TouchSlider::onTouchStop()();
		e.ontouchmove = this.@com.alenty.gwt.touch.client.TouchSlider::onTouchMove()();
		e.ontouchcancel = this.@com.alenty.gwt.touch.client.TouchSlider::onTouchCancel()();
		
	}-*/;

	public void onTouchCancel() {
		// TODO Auto-generated method stub
		
	}

	public void onTouchMove() {
		// TODO Auto-generated method stub
		
	}

	public void onTouchStart() {
		Window.alert("OnTouchStart");
	}

	public void onTouchStop() {
		// TODO Auto-generated method stub
		
	}
}
